package com.ruoyi.invest.mapper;

import com.ruoyi.invest.domain.TbInvest;
import com.ruoyi.invest.domain.TbInvestExample;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface TbInvestMapper {
    int countByExample(TbInvestExample example);

    int deleteByExample(TbInvestExample example);

    int deleteByPrimaryKey(Integer investId);

    int insert(TbInvest record);

    int insertSelective(TbInvest record);

    List<TbInvest> selectByExample(TbInvestExample example);

    TbInvest selectByPrimaryKey(Integer investId);

    int updateByExampleSelective(@Param("record") TbInvest record, @Param("example") TbInvestExample example);

    int updateByExample(@Param("record") TbInvest record, @Param("example") TbInvestExample example);

    int updateByPrimaryKeySelective(TbInvest record);

    int updateByPrimaryKey(TbInvest record);

    List<TbInvest> listuserid(TbInvest invest);

    @Select("select * from tb_invest where user_id=#{userId} and product_id=#{productId}")
    TbInvest selectbyproductid(TbInvest invest);
}